<?php

namespace App\Http\Controllers\admin;

use App\Cate;
use App\Http\Controllers\Api\Controller;
use Illuminate\Http\Request;


class CateController extends Base
{
    public function add(Request $request)
    {
        if($request->isMethod('post')){
            $map = $request->input();
            $model = Cate::add($map);
            return $model;
        }
    }


    /**
     *科目一分类
     */
    public function getcate()
    {
        $list = Cate::where('cate',1)->get();
        return $this->response->array($list);
    }
}
